package cn.consult.common.utils;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class GetStringParseDate {


    /**
     * 将字符串转date 在转字符串
     * @param dateString
     * @return
     * @throws ParseException
     */
    public static String stringToDateString(String dateString) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date date = sdf.parse(dateString);
        SimpleDateFormat sdfOutput = new SimpleDateFormat("yyyy-MM-dd");
        String formattedDate = sdfOutput.format(date);
        return formattedDate;
    }
}
